/**
 * 该文件用于发送axios请求
 */
import { http } from "../plugins/axios";

//主页获取信息接口
export interface MainPage {
  faAnLeiXing: FaAnLeiXing;
  shouPianRenQun: ShouPianRenQun;
  sunShiShu: SunShiShu;
  faAnXiaQu: FaAnXiaQu;
  totalData: TotalData;
}

export interface TotalData {
  faAnShu: string;
  sunShiShu: string;
  poAnShu: string;
  xSZhuaRen: string;
  xZZhuaRen: string;
  wanSunShu: string;
}

//发案类型
export interface FaAnLeiXing {
  leiXingZhanBi: LeiXingZhanBi[];
}

export interface LeiXingZhanBi {
  value: number;
  name: string;
}

//受骗人群
export interface ShouPianRenQun {
  renQunZhanBi: RenQunZhanBi[];
}

export interface RenQunZhanBi {
  value: number;
  name: string;
}

//损失数占比
export interface SunShiShu {
  sunShiShuZhanBi: SunShiShuZhanBi[];
}

export interface SunShiShuZhanBi {
  value: number;
  name: string;
}

//中心所辖区占比
export interface FaAnXiaQu {
  XiaQuFenZu: string[];
  XiaQuShuJu: string[];
}


export interface Anqing {
  XingZhengShu: number;
  XingZhengFenZu: string[];
  XingZhengShuJu: number[];
  XingShiShu: number;
  XingShiFenZu: string[];
  XingShiShuJu: number[];
}

export interface Yuqing {
  YuQingShu: number;
  YuQingFenZu: string[];
  YuQingShuJu: number[];
}

export interface Fangqing {
  FangQingShu: number;
  FangQingList: string[];
}

export interface Sheqing {
  SheQingShu: number;
  SheQingList: string[];
}

export interface MapData {
  timeData: string[]
  lineData: LineDaum[]
  starData: StarDaum[]
}

export interface LineDaum {
  monthData: string
  MapModelList: MapModelList[]
}

export interface MapModelList {
  name: string
  value: string
}

export interface StarDaum {
  monthData: string
  StarModelList: StarModelList[]
}

export interface StarModelList {
  name: string
  value: number[]
}

class homeApi {
  //获取主页显示信息
  getMainPage() {
    return http.request<MainPage>({
      //url: "/api/MainPage/GetMainPageJson",
      url: "MainPage/GetMainPageJsonTest",
      method: "post",
    });
  }
}

export default new homeApi();
